Atakar
Education helps new generations acquire the necessary knowledge, skills and understanding and develop their personalities in order to take their place in social life.In addition, the greatest wealth for a nation is not its underground or above-ground wealth, but the main great wealth is the generations of quality individuals that it has raised thanks to the education of that country. Educational processes of individuals in Turkey end up in different education levels due to various reasons such as the geographical locations of individuals, the insensitivity of parents or students to education, family problems, economic inadequacies, lack of working environment for students at home, physical inadequacy of schools. Differences in completed education levels are reflected to individuals as the gap between income levels in their future business life. Therefore, the aim of this project is to share and evaluate some remarkable education statistics in Turkey.
The first aim of the project is to see whether the level of education completed contributes to people’s income, and to observe whether the gender difference creates a privilege in the income earned for the same education levels. For this purpose, data showing annual average gross earnings by gender and completed education level for the years 2006, 2010, 2014 and 2018 were used.
data1 = read_excel("data/average_annual_gross_earnings_by_education_level.xls", range = "A8:F27")
data1 = data1[,-1]
colnames(data1)[c(1:5)] = paste(c("com_edu_lev",
"2006",
"2010",
"2014",
"2018"))
data1 = drop_na(data1)
i = 1
while (i <= 15 ) {
data1[c(i),1] = "Primary school and below"
data1[c(i+1),1] = "Primary education and secondary school"
data1[c(i+2),1] = "High school"
data1[c(i+3),1] = "Vocational high school"
data1[c(i+4),1] = "Higher education"
i = i+5;
}
data1 = data1 %>%
mutate(type = case_when(rownames(data1) %in% c(1:5) ~ "total",
rownames(data1) %in% c(6:10) ~ "male",
TRUE ~ "female"))
data1 = pivot_longer(data1, "2006":"2018", names_to = "Year")| com_edu_lev | type | Year | value |
|---|---|---|---|
| Primary school and below | total | 2006 | 9676.323 |
| Primary school and below | total | 2010 | 13099.221 |
| Primary school and below | total | 2014 | 18602.383 |
| Primary school and below | total | 2018 | 35171.056 |
| Primary education and secondary school | total | 2006 | 9640.158 |
| Primary education and secondary school | total | 2010 | 13043.379 |
data1 %>%
filter(type == "total") %>%
ggplot(aes(x=com_edu_lev, y=value, fill = Year)) +
geom_bar(stat = "identity", position ="dodge") +
scale_fill_manual(values=c("2006"= "#f20707","2010"="#ba0606","2014"="#800303","2018"="#5e0202")) +
labs(x="", y="",
title = "What Is The Average Annual Gross Earnings by Completed Education Level?",
subtitle = "Total") +
scale_y_continuous(expand=c(0,0),limits = c(0,78000), n.breaks = 20 ) +
scale_x_discrete(
breaks = c("Primary school and below",
"Primary education and secondary school",
"High school",
"Vocational high school",
"Higher education"),
label = c("Primary",
"Secondary",
"High School",
"Vocational High",
"Higher Education"),
limits = c("Primary school and below",
"Primary education and secondary school",
"High school",
"Vocational high school",
"Higher education")) +
theme(axis.text.x= element_text(size=8,color="black"),
axis.text.y =element_text(size=8,color="black"),
plot.title=element_text(color="black",size=10),
plot.subtitle = element_text(color="black",size=10),
legend.title=element_text(color="black",size=9))As can be seen from these three graphs, the annual average earnings of those who have completed primary, secondary and high school are almost the same, regardless of year and gender. It is seen that the earnings of the people who have completed the vocational high school are higher than the high school. As expected, the people with the highest earnings are college graduates.
data1 %>%
filter(Year == 2006 & ( type == "female" | type == "male" )) %>%
ggplot(aes(x=com_edu_lev, y=value, fill = type)) +
geom_bar(stat="identity", position = "dodge") +
scale_fill_manual(values=c("male"="#3197ad", "female"="#a80d7a")) +
labs(x="", y="",
title = "Comparison of Average Annual Gross Earnings of Men and Women \nby Completed Education Level",
subtitle = "Year: 2006") +
scale_y_continuous(expand=c(0,0),limits = c(0,33000), n.breaks = 20 ) +
scale_x_discrete(
breaks = c("Primary school and below",
"Primary education and secondary school",
"High school",
"Vocational high school",
"Higher education"),
label = c("Primary",
"Secondary",
"High",
"Vocational",
"Higher"),
limits = c("Primary school and below",
"Primary education and secondary school",
"High school",
"Vocational high school",
"Higher education")) +
theme(axis.text.x = element_text(size=8,color="black"),
axis.text.y =element_text(size=8,color="black"),
plot.title=element_text(color="black",size=10),
plot.subtitle = element_text(color="black",size=10),
legend.title=element_blank())When compare the annual average earnings as men and women, it would not be wrong to say that men with the same education level earn a little more than women with the same education level, regardless of the year.
The second aim of the project is to reveal the reasons why individuals who have completed an education level but have not completed their education until university cannot complete the education process and show how these reasons change due to gender difference. For this reason, data prepared by considering individuals between the ages of 15-34 in the second quarter of 2016 and showing the reasons why individuals did not complete their education until university were used.
data2 = read_excel("data/reasons_for_not_completing_university.xls", range = "A6:K23")
data2 = data2 %>%
setNames(c("completed_education_level",
"Total",
"his/her education is enough",
"failed exam",
"not interested in school",
"to cost of studying to high",
"want to work",
"family or spouse not allow schooling",
"marriage or other family reason",
"disability and health reason",
"other")) %>%
select(-2)
data2$`family or spouse not allow schooling` = as.numeric(data2$`family or spouse not allow schooling`)
data2 = data2[c(-6,-12),]
data2 = data2 %>%
mutate(type = case_when(rownames(data2) %in% c(1:5) ~ "total",
rownames(data2) %in% c(6:10) ~ "male",
TRUE ~ "female"))
i = 1
while (i <= 15 ) {
data2[c(i),1] = "Primary school"
data2[c(i+1),1] = "Junior high school"
data2[c(i+2),1] = "High school"
data2[c(i+3),1] = "Vocational high school"
data2[c(i+4),1] = "Higher education"
i = i+5;
}
data2 = pivot_longer(data2, "his/her education is enough":"other", names_to = "reason")| completed_education_level | type | reason | value |
|---|---|---|---|
| Primary school | total | his/her education is enough | 189 |
| Primary school | total | failed exam | 125 |
| Primary school | total | not interested in school | 199 |
| Primary school | total | to cost of studying to high | 491 |
| Primary school | total | want to work | 145 |
| Primary school | total | family or spouse not allow schooling | 421 |
data2 %>%
filter(type == "total") %>%
group_by(reason) %>%
summarise(total_value=sum(value)) %>%
ggplot(aes(x="", y=total_value, fill=reason)) +
geom_bar(stat="identity", width=1) +
coord_polar("y", start=0) +
scale_fill_manual(values=c(pie_col)) +
geom_text(aes(label = paste0(round(((total_value*100)/sum(total_value))), "%")), position = position_stack(vjust = 0.5))+
labs(x = NULL, y = NULL, fill = NULL, title = "What Are The Reasons People \nDo Not Go To University?") +
theme_classic() +
theme(axis.line = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
plot.title = element_text(hjust = 0.5, color = "#666666"))data2 %>%
filter(completed_education_level == "Primary school" & type == "total") %>%
ggplot(aes(x=value, y=reorder(reason, +value), fill = reason)) +
geom_bar(stat="identity", position = "dodge") +
scale_fill_manual(values=c(pie_col)) +
labs(x="", y="",title = "What Is The Reason For Not Attending Education\nAfter Primary School",
subtitle = "Total & 15-34 Age group & 2016 & Thousand person") +
scale_x_continuous(expand=c(0,0),limits = c(0,530), n.breaks = 10 ) +
scale_y_discrete(
breaks = c("completed_education_level",
"Total",
"his/her education is enough",
"failed exam",
"not interested in school",
"to cost of studying to high",
"want to work",
"family or spouse not allow schooling",
"marriage or other family reason",
"disability and health reason",
"other")) +
theme_classic() +
theme(legend.position = "none",
axis.text.x = element_text(size=8,color="black"),
axis.text.y =element_text(size=8,color="black"),
plot.title=element_text(color="black",size=10, face = "bold"),
plot.subtitle = element_text(color="black",size=10))While the high cost of education at low education levels plays a major role in not continuing education, it is seen that this reason loses its importance and decreases as the education level rises. In addition, failing the exams stands out as the most important reason for not continuing education at high school and vocational high school level.
data2 %>%
filter((type == "male" | type == "female") & completed_education_level == "Primary school") %>%
ggplot(aes(x=value, y=reorder(reason, +value), fill = type)) +
geom_bar(stat="identity", position="dodge") +
scale_fill_manual(values=c("male"="#355F3B", "female"="#FED700")) +
labs(x="", y="",title = "Comparison of Not Attending Reasons To University \nBetween Man and Women After Primary School",
subtitle = "15-34 Age group & 2016 & Thousand person") +
scale_x_continuous(expand=c(0,0),limits = c(0,430), n.breaks = 10 ) +
theme_classic() +
theme(axis.text.x = element_text(size=8,color="black"),
axis.text.y =element_text(size=8,color="black"),
plot.title=element_text(color="black",size=10, face = "bold"),
plot.subtitle = element_text(color="black",size=10),
legend.title = element_blank())While the number of women who did not complete the education process due to marriage and family problems in the early stages of education is quite high compared to men, the number of men who do not continue their education process due to their desire to work is also higher than women. Forced marriage of women at an early age due to family pressure and the desire of men to enter business life at an early age to help their families financially may be one of the factors in this situation.
Another aim of the project is to show how the education expenditures for various education levels and the amount of expenditure per student at each education level have changed over the years. Therefore, data containing information on education expenditure per student by education level between 2011 and 2020 were used.
data3 = read_excel("data/education_expenditure_per_student_by_education_level.xls", range = "A15:E69")
i = 1
while(i<=10){
data3[i,1] = "pre-primary"
data3[i+11,1] = "primary"
data3[i+22,1] = "lower secondary"
data3[i+33,1] = "upper secondary"
data3[i+44,1] = "tertiary"
i = i + 1
}
data3 = drop_na(data3);
data3 = data3 %>%
setNames(c("education_level",
"year",
"expenditure",
"exp per student (TL)",
"exp per student ($)"))| education_level | year | expenditure | exp per student (TL) | exp per student ($) |
|---|---|---|---|---|
| pre-primary | 2011 | 4126.437 | 3528 | 2103 |
| pre-primary | 2012 | 4972.221 | 4461 | 2477 |
| pre-primary | 2013 | 5312.991 | 4980 | 2614 |
| pre-primary | 2014 | 6587.123 | 5893 | 2689 |
| pre-primary | 2015 | 7221.838 | 6078 | 2231 |
| pre-primary | 2016 | 9034.809 | 7062 | 2333 |
data3 %>%
ggplot(aes(x = expenditure/1000, y=education_level)) +
geom_segment( aes(x=0, xend=expenditure/1000, y=education_level, yend=education_level), color="chartreuse4") +
geom_point( color="chartreuse2", size=3, alpha=0.6) +
scale_x_continuous(expand=c(0,0),limits = c(0,95),n.breaks = 10 ) +
transition_time(year) +
labs(x = "Expenditure", y = "",
title ="How Do Expenditures on Education Levels Change \nBetween 2011-2020?",
subtitle = "Year: {as.integer(frame_time)} & Billion TL") +
theme_light() +
theme(
panel.grid.major.y = element_blank(),
panel.border = element_blank(),
axis.ticks.y = element_blank(),
axis.text.y =element_text(size=6,color="black"),
axis.title.y=element_blank(),
axis.text.x = element_text(size=6,color="black"),
axis.title.x=element_text(size=6, hjust = 1),
plot.title=element_text(color="black",size=6, face = "bold"),
plot.subtitle = element_text(color="black",size=6)) data3 %>%
ggplot(aes(x = `exp per student (TL)`/1000, y=education_level)) +
geom_segment( aes(x=0, xend=`exp per student (TL)`/1000, y=education_level, yend=education_level), color="#ab0505") +
geom_point( color="#ab0505", size=3, alpha=0.6) +
scale_x_continuous(expand=c(0,0),limits = c(0,23), n.breaks = 11 ) +
labs(x = "Expenditure per Student", y = "",
title ="How Do Expenditures per Student on Education Levels \nChange Between 2011-2020?",
subtitle = "Year: {as.integer(frame_time)} & Thousand TL") +
theme_light() +
theme(
panel.grid.major.y = element_blank(),
panel.border = element_blank(),
axis.ticks.y = element_blank(),
axis.text.y =element_text(size=6,color="black"),
axis.title.y=element_blank(),
axis.text.x = element_text(size=6,color="black"),
axis.title.x=element_text(size=6, hjust = 1),
plot.title=element_text(color="black",size=6, face = "bold"),
plot.subtitle = element_text(color="black",size=6)) +
transition_time(year)In general, spending on all levels of education is increasing over the years, and accordingly, spending per student at each level of education is also increasing. In addition, it is observed that the higher the education level, the higher the expenditures. Tertiary education is the education level with the highest expenditure per student.
The final aim of the project is to show what the educational status of individuals living in provinces in Turkey is and how it has changed over 4-year periods between 2008-2020.
data4 = read_excel("data/education_level_completed_by_province.xls", range = "A7:AW1072")
data4 = data4 %>% select_if(~sum(!is.na(.)) > 0)
data4 = drop_na(data4)
data4 = data4[-c(4:6)]
data4 = data4[-seq(5,32,by=3)]
data4 = data4[-seq(5,23,by=2)]
colnames(data4)[c(1,2,3,4,5,6)] = paste(c("Year",
"Province_code",
"Province_name",
"Illiterate",
"Literate_without_a_diploma",
"Primary_school"),
sep="")
colnames(data4)[c(7,8,9,10,11,12,13)] = paste(c("Primary_education",
"Junior_and_vocational_high_school",
"High_and_vocational_high_school",
"Universities_and_other_higher_educational_institutions",
"Master",
"Doctorate",
"Unknown"),
sep="")
i = 4
for(i in 4:length(data4)){
data4[[i]] = as.numeric(data4[[i]])
}
province_names = data4 %>%
filter(Year == 2008) %>%
select(Province_name) %>%
arrange(Province_name)| Year | Province_code | Province_name | Illiterate | Literate_without_a_diploma | Primary_school | Primary_education | Junior_and_vocational_high_school | High_and_vocational_high_school | Universities_and_other_higher_educational_institutions | Master | Doctorate | Unknown |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 | 1 | Adana | 151423 | 88124 | 469036 | 164036 | 84299 | 300221 | 93801 | 4705 | 1505 | 104772 |
| 2008 | 2 | Adıyaman | 70507 | 33368 | 107482 | 57856 | 16956 | 62867 | 13952 | 506 | 103 | 28456 |
| 2008 | 3 | Afyon | 48353 | 30108 | 228018 | 60563 | 26293 | 82334 | 23466 | 1408 | 412 | 19716 |
| 2008 | 4 | Ağrı | 66651 | 57594 | 57624 | 28685 | 5175 | 27576 | 5404 | 416 | 111 | 63334 |
| 2008 | 5 | Amasya | 21599 | 18221 | 95430 | 27658 | 12249 | 42760 | 14956 | 494 | 103 | 18039 |
| 2008 | 6 | Ankara | 153179 | 118282 | 977183 | 328453 | 245614 | 930776 | 442315 | 44598 | 16239 | 251443 |
url = "https://tr.wikipedia.org/wiki/T%C3%BCrkiye%27deki_illerin_geli%C5%9Fmi%C5%9Flik_d%C3%BCzeyleri#%C4%B0nsani_Geli%C5%9Fme_Endeksi'ne_g%C3%B6re"
html = read_html(url)
development_index_of_cities = html %>%
html_elements("table") %>%
.[[1]] %>%
html_table()
development_index_of_cities = development_index_of_cities %>%
select(-1)
development_index_of_cities$Kademe = as.factor(development_index_of_cities$Kademe)
colnames(development_index_of_cities)[c(1,2,3)] = paste(c("Province_name",
"Score",
"level"), sep = "")
development_index_of_cities = development_index_of_cities %>%
arrange(Province_name)
development_index_of_cities[,"Province_name"] = province_names$Province_name| Province_name | Score | level |
|---|---|---|
| Adana | 0,353 | 3 |
| Adıyaman | -0,926 | 6 |
| Afyon | -0,023 | 4 |
| Ağrı | -1,752 | 6 |
| Aksaray | -0,271 | 4 |
| Amasya | 0,054 | 4 |
## Reading layer `tur_polbnda_adm1' from data source
## `C:\Users\turab\Documents\R\project_final_report-atakar\data\turkey_administrativelevels0_1_2\tur_polbnda_adm1.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 81 features and 8 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 25.66851 ymin: 35.80842 xmax: 44.81793 ymax: 42.10479
## Geodetic CRS: WGS 84
tur_polbnda_adm1_sf = tur_polbnda_adm1_sf %>%
select(adm1_tr) %>%
rename("Province_name" = "adm1_tr")
tur_polbnda_adm1_sf[c(68,69,70,71,72),] = tur_polbnda_adm1_sf[c(69,70,72,68,71),]
tur_polbnda_adm1_sf[,"Province_name"] = province_names$Province_name
tur_pntcntr_adm1_sf = st_read("./data/turkey_centralpoints_1_2/tur_pntcntr_adm1.shp")## Reading layer `tur_pntcntr_adm1' from data source
## `C:\Users\turab\Documents\R\project_final_report-atakar\data\turkey_centralpoints_1_2\tur_pntcntr_adm1.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 81 features and 8 fields
## Geometry type: POINT
## Dimension: XY
## Bounding box: xmin: 26.40629 ymin: 36.19888 xmax: 44.0455 ymax: 42.02687
## Geodetic CRS: WGS 84
data4 %>%
pivot_longer("Illiterate":"Unknown", names_to = "edu_lev", values_to = "value") %>%
filter(edu_lev == "Illiterate") %>%
ggplot(aes(x = value/1000 , y=Province_name)) +
geom_segment( aes(x=0, xend=value/1000, y=Province_name, yend=Province_name), color="#ab0505") +
geom_point( color="#ab0505", alpha=0.6) +
labs(x = "Number of Person", y = "",
title ="Number of Illiterate People in Turkey by Year",
subtitle = " Year: {as.integer(frame_time)} \nPopulation 15 years of age and over & Thousand Person") +
scale_x_continuous(expand=c(0,0),limits = c(0,500), n.breaks = 20 ) +
theme_light() +
theme(
panel.grid.major.y = element_blank(),
panel.border = element_blank(),
axis.ticks.y = element_blank(),
axis.text.y =element_text(size=4,color="black"),
axis.title.y=element_blank(),
axis.text.x = element_text(size=4,color="black"),
axis.title.x=element_text(size=6, hjust = 1),
plot.title=element_text(color="black",size=6, face = "bold"),
plot.subtitle = element_text(color="black",size=6)) +
transition_time(Year)As it can be understood from the point graph above, there is a decrease in the number of illiterate people in almost all provinces in Turkey from 2008 to 2020. It is seen that Istanbul experienced the biggest decrease in the number of illiterate people depending on the population. Adana, İzmir and Şanlıurfa are also the provinces that experienced a great decrease in the number of illiterate people after İstanbul.
data4_2008 = data4 %>%
filter(Year == 2008) %>%
select(-c(2,4,5)) %>%
arrange(Province_name)
turkey_2008 = data4_2008 %>%
full_join(development_index_of_cities) %>%
full_join(tur_polbnda_adm1_sf)
turkey_2008 <- st_as_sf(turkey_2008)The development levels of the provinces in Turkey are reflected in the interactive maps below, thanks to the indexes determined according to the socio-economic development criteria of the Devlet Planlama Teşkilatı, and the educational status of the individuals living in that province is revealed above the provinces.
What is the educational status of the people in the provinces of Turkey in 2008?
turkey_2008 %>%
leaflet() %>%
addPolygons(fillColor = ~pal_col8(level),
fillOpacity = 1,
smoothFactor = 1,
color = "black",
weight = 1,
label = labels8,
labelOptions = labelOptions(style = list("color" = "white", #for popup label
"background-color" = "#57A0CE",
"border-color" = "#57A0CE",
"padding" = "20px"),
textsize = "15px",
direction = "auto"),
highlight = highlightOptions(weight = 1,
fillColor = "white",
bringToFront = TRUE)) %>%
addLabelOnlyMarkers(lng = tur_pntcntr_adm1_sf$longitude,
lat = tur_pntcntr_adm1_sf$latitude,
label = ~Province_name,
labelOptions = labelOptions(noHide = T,
direction = "center",
textsize = "9px",
style = list("color" = "white",
"background-color" = "#1664AB",
"border-color" = "#1664AB",
"border-radius" = "35%",
"padding" = "0px"))) %>%
addLegend("bottomright", pal = pal_col8, values = ~level,
title = "Dev. İndex (2017)",
opacity = 1)